package com.example.zxw.entity;

import androidx.annotation.IntDef;

import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;


public class CodeException {
    /*网络错误*/
    public static final int NETWORD_ERROR = 0x1;
    /*http_错误*/
    public static final int HTTP_ERROR = 0x2;
    /*json解析错误*/
    public static final int JSON_ERROR = 0x3;
    /*未知错误*/
    public static final int UNKNOWN_ERROR = 0x4;
    /*运行时异常-包含自定义异常*/
    public static final int RUNTIME_ERROR = 0x5;
    /*服务器返回的无数据错误*/
    public static final int NODATA_ERROR = 0x6;
    /*无法解析该域名*/
    public static final int UNKOWNHOST_ERROR = 0x7;
    /*重复登录，token错误等*/
    public static final int RELOGIN_ERROR = 0x8;
    /*请求成功，服务器返回错误码(需要显示服务器返回的错误提示时使用)*/
    public static final int SERVER_ERROR = 0x9;


    @IntDef({NETWORD_ERROR, HTTP_ERROR, RUNTIME_ERROR, UNKNOWN_ERROR, JSON_ERROR, NODATA_ERROR,UNKOWNHOST_ERROR,RELOGIN_ERROR,SERVER_ERROR})
    @Retention(RetentionPolicy.SOURCE)

    public @interface CodeEp {
    }
}
